﻿using OF.Component.BLL;
using OpSystem.common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace OpSystem.manage
{
    public partial class ProvinceList : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            CheckPageCode("10201");
            if (!Page.IsPostBack)
            {
                MyBind();
            }
        }

        private void MyBind()
        {
            int intCount = 0;
            var list = BaseLocationOperate.Search(out intCount, AspNetPager1.CurrentPageIndex,
                                        AspNetPager1.PageSize, " LocationGeographyTypeID = 0 and LocationStatus=1", "locationId", false);
            rptList.DataSource = list;
            rptList.DataBind();
            AspNetPager1.RecordCount = intCount;
        }

        protected void AspNetPager1_PageChanged(object sender, EventArgs e)
        {
            MyBind();
        }

    }
}